home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Media Design Review 1999
/
Interactive Media Design Review 1999.iso
/
pc
/
Demos
/
Bombardier_PC
/
DATACH.CST
/
00201_Script_planesSprite
< prev
next >
Wrap
Text File
|
1999-03-07
|
2KB
|
51 lines
property mySpriten, hiliteSpriten, myRectn
on new me
set mySpriten = the spriteNum of me
set hiliteSpriten = mySpriten -2
set myRectn = the rect of sprite mySpriten
--
set hiliteSpriten = sendSprite((mySpriten - 1), #register, me)
puppetSprite hiliteSpriten, true
set the loc of sprite hiliteSpriten = point(-1000, -1000)
return me
end
on checkIfInside me
set myRectn = the rect of sprite mySpriten
set theMouseLoc = point(the mouseH, the mouseV)
if inside(theMouseLoc, myRectn) then
set myMember = the member of sprite mySpriten
set myTop = the top of sprite mySpriten
set theH = the left of sprite mySpriten
set adjustedMouseV = (the mouseV - myTop)
set theLine = locVToLinePos(member myMember, adjustedMouseV)
set theV = linePosToLocV(member myMember, theLine)
set the loc of sprite hiliteSpriten = point(theH, (theV+myTop))
set the width of sprite hiliteSpriten = the width of member myMember
else
set the loc of sprite hiliteSpriten = point(-1000, -1000)
end if
updateStage
end
on getPlaneName me
set theMouseLoc = point(the mouseH, the mouseV)
if inside(theMouseLoc, myRectn) then
set hiliteV = the top of sprite hiliteSpriten - the top of sprite mySpriten
set myMember = the member of sprite mySpriten
set theLine = locVToLinePos(member myMember, hiliteV)
set theText = the text of member myMember
set textLine = line theLine of theText
set the loc of sprite hiliteSpriten = point(-1000,-1000)
else
set textLine = ""
end if
return textLine
end